package dominion.player;

import dominion.Dominion;
import dominion.kingdom.MitchellsChapel;

public class Mitchell extends TresureOnlyPlayer {

	boolean buy = false;

	public Mitchell(Dominion dominion) {
		this("Mitchell", dominion);
	}

	public Mitchell(String name, Dominion dominion) {
		super(name, dominion);
	}

	@Override
	public int buy(Dominion dominion, int value) {
		if (buy == false && 1 < value) {
			buy = true;
			if (dominion.buy(this, new MitchellsChapel())) {
				value -= 2;
			}
		} else {
			value = super.buy(dominion, value);
		}
		return value;
	}

}
